<?php

class jobcatsController {
	
	function __construct() {
	}
	
	public function render( $tplname, $data = null ) {
		$block = App::me()->viewPath. DIRECTORY_SEPARATOR .'payments'. DIRECTORY_SEPARATOR .$tplname;
		$tpl = App::me()->tpl;
		$tpl->display($block.'.tpl');
	}
	
	public function index() {		
		if( !Tools::isAjax() ) return;
		$this->render('jobcats');		
	}	

	public function listjct() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new jobcats;
		$data = $model->listjct();
		echo json_encode( $data );
	}
	
	public function insjct() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new jobcats;
		$data = $model->insjct();
		echo json_encode( $data );
	}
	
	public function updjct() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new jobcats;
		$data = $model->updjct();
		echo json_encode( $data );
	}
	
	public function deljct() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new jobcats;
		$data = $model->deljct();
		echo json_encode( $data );
	}
		
	public function jsload() {		
		if( !Tools::isAjax() ) return;
		App::me()->js_load('jobcats.js');
	}	
	
}
?>